/*************************************************************************
	> File Name: B3624.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2025-01-23 15:18:28
 ************************************************************************/

#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;

#define MAX_N 40
#define MAX_M 500

int dp[MAX_M + 5];

int main() {
    int n, l, r;
    cin >> n >> l >> r;
    dp[0] = 1;
    for (int i = 1, w; i <= n; i++) {
        cin >> w;
        for (int j = r; j >= w; j--) {
            dp[j] += dp[j - w];
        }
    }
    int cnt = 0;
    for (int j = l; j <= r; j++) {
        cnt += dp[j];
    }
    cout << cnt << endl;
    return 0;
}
